package cn.sheep.dmp.utils

/**
  * Sheep.Old @ 64341393
  * Created 2018/3/28
  */
object Tools {

    def str2Int(str: String): Int = {
        try {
            str.toInt
        } catch {
            case _: Exception => 0
        }
    }

    def str2Double(str: String): Double = {
        try {
            str.toDouble
        } catch {
            case _: Exception => 0
        }
    }

}
